package com.kjtpay.design_pattern.state;

class AfternoonState extends State {
    // 下午 13~17点
    @Override
    public void writeProgram(Work work) {
        if ((work.hour >= 13) && (work.hour < 17)) {
            information = "当前时间：" + work.hour + "点" + work.minute + "分"
                    + " ===> 下午状态还不错，继续努力。";
        } else {
            work.current = new EveningState();
            work.writeProgram();
        }
    }
}
